// QuickView.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CQuickView view
#include "afxrich.h"
class CQuickView : public CRichEditView
{
protected: // create from serialization only
	CQuickView();
	DECLARE_DYNCREATE(CQuickView)

// Attributes
public:
	CFont m_font;
	int  m_nMaxLine;
	BOOL m_bPastToSize;

	BOOL m_bReadOnly;		// TRUE for stderr
	void SetReadOnly(BOOL bReadOnly);

protected:
	LONG m_CharHeight;

    int m_nEditPos;
    CHAR m_EditBuffer[BUFFER_SIZE];
    long m_nStartChar, m_nStopChar;
    void DeleteCommand();

// Operations
public:
	void SetPrintRect(CDC *pDC, CPrintInfo *pInfo);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CQuickView)
	public:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	protected:
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// operations
public:
    void Save(LPCTSTR filename);
    void Append(LPCTSTR str);
    void WriteTTY(LPCTSTR str);
	BOOL IsEmpty();
	void DeleteExtraLines(LPCTSTR lpszStr = NULL);

protected:
    BOOL OpenFile(CFile& f, LPCSTR lpszPathName);

// Implementation
public:
	virtual ~CQuickView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	// Generated message map functions
	//{{AFX_MSG(CQuickView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnEditClearAll();
	afx_msg void OnUpdateEditClearAll(CCmdUI* pCmdUI);
	afx_msg void OnEditWrap();
	afx_msg void OnUpdateEditWrap(CCmdUI* pCmdUI);
	afx_msg void OnLinePerPage();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnDestroy();
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
